package com.gtenacg.cartoonservice.service.impl;

import com.gtenacg.cartoonservice.mapper.CartoonTypeMapper;
import com.gtenacg.cartoonservice.pojo.model.CartoonType;
import com.gtenacg.cartoonservice.service.CartoonTypeService;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;

import java.util.List;

/**
* @author 86198
* @description 针对表【cartoon_type(漫画类型)】的数据库操作Service实现
* @createDate 2024-05-09 11:28:02
*/
@Service
@RequiredArgsConstructor
public class CartoonTypeServiceImpl implements CartoonTypeService {
    private final CartoonTypeMapper typeMapper;

    @Override
    public List<CartoonType> list() {
        return typeMapper.list();
    }

    @Override
    public Integer insert(CartoonType cartoonType) {
        typeMapper.insert(cartoonType);
        return cartoonType.getCtid();
    }

    @Override
    public void update(CartoonType cartoonType) {
        typeMapper.update(cartoonType);
    }

    @Override
    public void delete(List<Integer> ids) {
        typeMapper.delete(ids);
    }

    @Override
    public List<CartoonType> search(String name) {
        return typeMapper.search(name);
    }
}




